package zuoye6;

import java.util.ArrayList;
import java.util.Collections;

public class ShuangSeqQiu {
    public static void main(String[] args) {
           ArrayList <Integer> list=new ArrayList<>();

        int num1 = (int) (Math.random() * 32) + 1;
        list.add(num1);

        do {
            int num = (int) (Math.random() * 32) + 1;
            for (int i = 0; i < list.size(); i++) {
                int s = (int) list.get(i);
                if (s!=num){
                    list.add(num);
                    }break;
            }
        }while (list.size()!=6);

        Collections.sort(list);

        int numBlue = (int) (Math.random() * 32) + 1;
        list.add(numBlue);
        for(int a:list){
            System.out.print(a+",");
        }
    }
}